package com.zretc.service.impl;

import com.zretc.dao.CourierMapper;
import com.zretc.entity.Courier;
import com.zretc.service.CourierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourierServiceImpl implements CourierService {
    @Autowired
    private CourierMapper courierMapper;

    @Override
    public int courierRegiseter(Courier courier) {
        return courierMapper.insertCourier(courier);
    }

    @Override
    public Courier login(String courierName, String courierPsw) {
        return courierMapper.findByCourierNameAndCourierPsw( courierName, courierPsw);
    }

    @Override
    public Courier findDeliveryView(String courierId) {
        return courierMapper.selectDeliveryView(courierId);
    }
}
